package com.day11;

public class Animal {
    public int age=40;
    public void eat(){
        System.out.println("Animal eat");
    }
    public class Cat extends Animal{
        public int age=20;
        public int weight=10;
        @Override
        public void eat(){
            System.out.println("Cat eat");
        }
        public void playGame(){
            System.out.println("Cat playGame");
        }
    }
    public class AnimalDemo{
        public void main(String[] args) {
            Animal a=new Cat();
            System.out.println(a.age);
            a.eat();

        }
    }
}
